package test01;

// Google适配器
public class GoogleAdapter implements UnifiedAIService {
    private GeminiClient geminiClient;

    public GoogleAdapter(GeminiClient geminiClient) {
        this.geminiClient = geminiClient;
    }

    @Override
    public String generateText(String prompt) {
        // 将统一请求转换为Gemini特定格式
        Content content = convertToGeminiContent(prompt);

        // 调用原生Gemini客户端
        GenerateContentResponse response = geminiClient.generateContent(content);

        // 将Gemini响应转换为统一格式
        return response.getText();
    }

    private Content convertToGeminiContent(String prompt) {
        // 实现请求格式转换逻辑
        return new Content(prompt);
    }
}
